﻿using UnityEngine;
using System.Collections;
using System.Collections.Generic;
using BehaviorDesigner.Runtime;

public class CTF_Manager : MonoBehaviour {
    private static CTF_Manager _instance;
    public static CTF_Manager Instance
    {

        get
        {
            return _instance;
        }
    }


    private List<BehaviorTree> flagNotTakenBehhaviorTree = new List<BehaviorTree>();
    private List<BehaviorTree> flagTakenBehaviorTree = new List<BehaviorTree>();
	// Use this for initialization
   
    void Awake()
    {
        _instance = this;
    }

    void Start()
    {

        BehaviorTree[] bts = FindObjectsOfType<BehaviorTree>();
        foreach( var bt in bts)
        {
            if(bt.Group ==1)
            {
                flagNotTakenBehhaviorTree.Add(bt);
            }
            else
            {
                flagTakenBehaviorTree.Add(bt);
            }
        }
    }


    public  void TakeFlag()
    {
        Debug.Log("heihei ");
    }
}
